home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / dev / obero / Interfaces3_4.lha / Interfaces / Misc.mod < prev    next >
Text File  |  1994-03-05  |  1KB  |  51 lines

  1. (*
  2. (*
  3. **  Amiga Oberon Interface Module:
  4. **  $VER: Misc.mod 40.15 (28.12.93) Oberon 3.0
  5. **
  6. **   © 1993 by Fridtjof Siebert
  7. *)
  8. *)
  9.  
  10. MODULE Misc;
  11.  
  12. IMPORT e * := Exec;
  13.  
  14.  
  15. CONST
  16.  
  17. (*
  18.  * Unit number definitions.  Ownership of a resource grants low-level
  19.  * bit access to the hardware registers.  You are still obligated to follow
  20.  * the rules for shared access of the interrupt system (see
  21.  * exec.library/SetIntVector or cia.resource as appropriate).
  22.  *)
  23.   serialPort   * = 0; (* Amiga custom chip serial port registers
  24.                          (SERDAT,SERDATR,SERPER,ADKCON, and interrupts) *)
  25.   serialBits   * = 1; (* Serial control bits (DTR,CTS, etc.) *)
  26.   parallelPort * = 2; (* The 8 bit parallel data port
  27.                          (CIAAPRA & CIAADDRA only!) *)
  28.   parallelBits * = 3; (* All other parallel bits & interrupts
  29.                          (BUSY,ACK,etc.) *)
  30.  
  31.   miscName * = "misc.resource";
  32.  
  33.  
  34. VAR
  35.  
  36. (*
  37.  *  You have to put a pointer to the misc.resource here to use the misc
  38.  *  procedures:
  39.  *)
  40.  
  41.   base * : e.APTR;
  42.  
  43.  
  44. PROCEDURE AllocMiscResource *{base,-  6}(unitNum{0}  : LONGINT;
  45.                                          name{9}     : ARRAY OF CHAR): e.APTR;
  46. PROCEDURE FreeMiscResource  *{base,- 12}(unitNum{0}  : LONGINT);
  47.  
  48. END Misc.
  49.  
  50.  
  51.